﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using WebApplication4._1.Models;

namespace WebApplication4._1.Controllers
{
    public class HomeController : Controller
    {
        public ActionResult Index()
        {
            return View();
        }

        public ActionResult About()
        {
            ViewBag.Message = "Your application description page.";

            return View();
        }

        public ActionResult Contact()
        {
            ViewBag.Message = "Your contact page.";

            return View();
        }
        public ActionResult Values()
        {
           

            Model1 model = new Model1();
            var task = model.Task.ToList();
           
            return View(task);

        }
        public ActionResult View1() {

            Model1 model = new Model1();
            
            var list = model.Task.FirstOrDefault(p => p.TaskID == 1);
            return View(list);
        
        
        }
    }
}